import os

_setting_name = os.environ['DJANGO_SETTINGS_MODULE'].split('.')[-1]

if _setting_name in ['localhost']:
	DATABASES = {
		'default': {
			'ENGINE': 'django.db.backends.mysql',
			'NAME': 'dj_open',
			'HOST': 'cdb-m8k4mqiu.bj.tencentcdb.com',
			'USER': 'dj_open',
			'PASSWORD': 'KSpT#8CG',
			'PORT': '10253',
		}
	}
elif _setting_name == 'ecs':
	DATABASES = {
		'default': {
			'ENGINE': 'django.db.backends.mysql',
			'NAME': 'baidu',
			'HOST': 'www.baidu.com',
			'USER': 'baidu',
			'PASSWORD': 'baidu',
			'PORT': '3306',
		}
	}
